package E判断和循环.练习;

public class B自动驾驶 {
    public static void main(String[] args) {
        //汽车无人驾驶设计大量的判断
        //如果红灯，就停止
        //如果是黄灯亮，就减速
        //如果是绿灯亮，就行驶

        //1.定义三个变量表示灯的状态
        //true 亮  false 灭

        boolean isLightGreen = false;
        boolean isLightYellow = false;
        boolean isLightRed = true;

        //2.判断
        if (isLightGreen) {
            System.out.println("GoGoGo!!!");
        }else if (isLightYellow) {
            System.out.println("slow!!!");
        }else  if (isLightRed) {
            System.out.println("stop!!!");
        }

      }
    }
